package com.visualexpress.util;

import com.visualexpress.data.*;

public class TimeUitil {
	
	public static Time hourToDate(int hour){
		
		Time d = new Time(0, 1, 1, 0);
		
		d.addTime(hour);
		
		return d;
	}//end of houtToDate
	
	public static int timeSubstract(Time later, Time former){
		
		int extraHours = later.numOfHours() - former.numOfHours();
		
		if(extraHours > 0){
			return extraHours;
		}
		else{
			return -1;
		}
		
	}//end of timeSubstract()
	
}
